import sqlite3, sys

conn = sqlite3.connect('pokedex.db')
curs = conn.cursor()

def execute(query):
	curs.execute(query)
	for row in curs.fetchall():
		print(row)

sentence = 'SELECT * FROM '
try:
	query = sentence + sys.argv[1]
	print(query)
	execute(query)
except:
	while True:
		query = sentence + input(sentence)
		execute(query)